/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.BinaryFingerprint;
import io.sirius.ms.sdk.model.DBLink;
import io.sirius.ms.sdk.model.SpectralLibraryMatch;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * StructureCandidateScored
 */
@JsonPropertyOrder({
  StructureCandidateScored.JSON_PROPERTY_INCHI_KEY,
  StructureCandidateScored.JSON_PROPERTY_SMILES,
  StructureCandidateScored.JSON_PROPERTY_STRUCTURE_NAME,
  StructureCandidateScored.JSON_PROPERTY_STRUCTURE_SVG,
  StructureCandidateScored.JSON_PROPERTY_DB_LINKS,
  StructureCandidateScored.JSON_PROPERTY_SPECTRAL_LIBRARY_MATCHES,
  StructureCandidateScored.JSON_PROPERTY_XLOG_P,
  StructureCandidateScored.JSON_PROPERTY_RANK,
  StructureCandidateScored.JSON_PROPERTY_CSI_SCORE,
  StructureCandidateScored.JSON_PROPERTY_TANIMOTO_SIMILARITY,
  StructureCandidateScored.JSON_PROPERTY_MCES_DIST_TO_TOP_HIT,
  StructureCandidateScored.JSON_PROPERTY_FINGERPRINT
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class StructureCandidateScored {
  public static final String JSON_PROPERTY_INCHI_KEY = "inchiKey";
  @jakarta.annotation.Nullable
  private String inchiKey;

  public static final String JSON_PROPERTY_SMILES = "smiles";
  @jakarta.annotation.Nullable
  private String smiles;

  public static final String JSON_PROPERTY_STRUCTURE_NAME = "structureName";
  @jakarta.annotation.Nullable
  private String structureName;

  public static final String JSON_PROPERTY_STRUCTURE_SVG = "structureSvg";
  @jakarta.annotation.Nullable
  private String structureSvg;

  public static final String JSON_PROPERTY_DB_LINKS = "dbLinks";
  @jakarta.annotation.Nullable
  private List<DBLink> dbLinks;

  public static final String JSON_PROPERTY_SPECTRAL_LIBRARY_MATCHES = "spectralLibraryMatches";
  @jakarta.annotation.Nullable
  private List<SpectralLibraryMatch> spectralLibraryMatches;

  public static final String JSON_PROPERTY_XLOG_P = "xlogP";
  @jakarta.annotation.Nullable
  private Double xlogP;

  public static final String JSON_PROPERTY_RANK = "rank";
  @jakarta.annotation.Nullable
  private Integer rank;

  public static final String JSON_PROPERTY_CSI_SCORE = "csiScore";
  @jakarta.annotation.Nullable
  private Double csiScore;

  public static final String JSON_PROPERTY_TANIMOTO_SIMILARITY = "tanimotoSimilarity";
  @jakarta.annotation.Nullable
  private Double tanimotoSimilarity;

  public static final String JSON_PROPERTY_MCES_DIST_TO_TOP_HIT = "mcesDistToTopHit";
  @jakarta.annotation.Nullable
  private Double mcesDistToTopHit;

  public static final String JSON_PROPERTY_FINGERPRINT = "fingerprint";
  @jakarta.annotation.Nullable
  private BinaryFingerprint fingerprint;

  public StructureCandidateScored() {
  }

  public StructureCandidateScored inchiKey(@jakarta.annotation.Nullable String inchiKey) {
    
    this.inchiKey = inchiKey;
    return this;
  }

  /**
   * Get inchiKey
   * @return inchiKey
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_INCHI_KEY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getInchiKey() {
    return inchiKey;
  }


  @JsonProperty(JSON_PROPERTY_INCHI_KEY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setInchiKey(@jakarta.annotation.Nullable String inchiKey) {
    this.inchiKey = inchiKey;
  }

  public StructureCandidateScored smiles(@jakarta.annotation.Nullable String smiles) {
    
    this.smiles = smiles;
    return this;
  }

  /**
   * Get smiles
   * @return smiles
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SMILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getSmiles() {
    return smiles;
  }


  @JsonProperty(JSON_PROPERTY_SMILES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSmiles(@jakarta.annotation.Nullable String smiles) {
    this.smiles = smiles;
  }

  public StructureCandidateScored structureName(@jakarta.annotation.Nullable String structureName) {
    
    this.structureName = structureName;
    return this;
  }

  /**
   * Get structureName
   * @return structureName
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STRUCTURE_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getStructureName() {
    return structureName;
  }


  @JsonProperty(JSON_PROPERTY_STRUCTURE_NAME)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStructureName(@jakarta.annotation.Nullable String structureName) {
    this.structureName = structureName;
  }

  public StructureCandidateScored structureSvg(@jakarta.annotation.Nullable String structureSvg) {
    
    this.structureSvg = structureSvg;
    return this;
  }

  /**
   * SVG graphics of the structure candidate  OPTIONAL: needs to be added by parameter
   * @return structureSvg
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STRUCTURE_SVG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getStructureSvg() {
    return structureSvg;
  }


  @JsonProperty(JSON_PROPERTY_STRUCTURE_SVG)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStructureSvg(@jakarta.annotation.Nullable String structureSvg) {
    this.structureSvg = structureSvg;
  }

  public StructureCandidateScored dbLinks(@jakarta.annotation.Nullable List<DBLink> dbLinks) {
    
    this.dbLinks = dbLinks;
    return this;
  }

  public StructureCandidateScored addDbLinksItem(DBLink dbLinksItem) {
    if (this.dbLinks == null) {
      this.dbLinks = new ArrayList<>();
    }
    this.dbLinks.add(dbLinksItem);
    return this;
  }

  /**
   * List of structure database links belonging to this structure candidate  OPTIONAL: needs to be added by parameter
   * @return dbLinks
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DB_LINKS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<DBLink> getDbLinks() {
    return dbLinks;
  }


  @JsonProperty(JSON_PROPERTY_DB_LINKS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDbLinks(@jakarta.annotation.Nullable List<DBLink> dbLinks) {
    this.dbLinks = dbLinks;
  }

  public StructureCandidateScored spectralLibraryMatches(@jakarta.annotation.Nullable List<SpectralLibraryMatch> spectralLibraryMatches) {
    
    this.spectralLibraryMatches = spectralLibraryMatches;
    return this;
  }

  public StructureCandidateScored addSpectralLibraryMatchesItem(SpectralLibraryMatch spectralLibraryMatchesItem) {
    if (this.spectralLibraryMatches == null) {
      this.spectralLibraryMatches = new ArrayList<>();
    }
    this.spectralLibraryMatches.add(spectralLibraryMatchesItem);
    return this;
  }

  /**
   * List of spectral library matches belonging to this structure candidate  OPTIONAL: needs to be added by parameter
   * @return spectralLibraryMatches
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_SPECTRAL_LIBRARY_MATCHES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<SpectralLibraryMatch> getSpectralLibraryMatches() {
    return spectralLibraryMatches;
  }


  @JsonProperty(JSON_PROPERTY_SPECTRAL_LIBRARY_MATCHES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setSpectralLibraryMatches(@jakarta.annotation.Nullable List<SpectralLibraryMatch> spectralLibraryMatches) {
    this.spectralLibraryMatches = spectralLibraryMatches;
  }

  public StructureCandidateScored xlogP(@jakarta.annotation.Nullable Double xlogP) {
    
    this.xlogP = xlogP;
    return this;
  }

  /**
   * Get xlogP
   * @return xlogP
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_XLOG_P)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getXlogP() {
    return xlogP;
  }


  @JsonProperty(JSON_PROPERTY_XLOG_P)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setXlogP(@jakarta.annotation.Nullable Double xlogP) {
    this.xlogP = xlogP;
  }

  public StructureCandidateScored rank(@jakarta.annotation.Nullable Integer rank) {
    
    this.rank = rank;
    return this;
  }

  /**
   * the overall rank of this candidate among all candidates of this feature
   * @return rank
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_RANK)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Integer getRank() {
    return rank;
  }


  @JsonProperty(JSON_PROPERTY_RANK)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRank(@jakarta.annotation.Nullable Integer rank) {
    this.rank = rank;
  }

  public StructureCandidateScored csiScore(@jakarta.annotation.Nullable Double csiScore) {
    
    this.csiScore = csiScore;
    return this;
  }

  /**
   * CSI:FingerID score of the fingerprint of this compound to the predicted fingerprint of CSI:FingerID  This is the score used for ranking structure candidates
   * @return csiScore
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_CSI_SCORE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getCsiScore() {
    return csiScore;
  }


  @JsonProperty(JSON_PROPERTY_CSI_SCORE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCsiScore(@jakarta.annotation.Nullable Double csiScore) {
    this.csiScore = csiScore;
  }

  public StructureCandidateScored tanimotoSimilarity(@jakarta.annotation.Nullable Double tanimotoSimilarity) {
    
    this.tanimotoSimilarity = tanimotoSimilarity;
    return this;
  }

  /**
   * Tanimoto similarly of the fingerprint of this compound to the predicted fingerprint of CSI:FingerID
   * @return tanimotoSimilarity
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TANIMOTO_SIMILARITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getTanimotoSimilarity() {
    return tanimotoSimilarity;
  }


  @JsonProperty(JSON_PROPERTY_TANIMOTO_SIMILARITY)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTanimotoSimilarity(@jakarta.annotation.Nullable Double tanimotoSimilarity) {
    this.tanimotoSimilarity = tanimotoSimilarity;
  }

  public StructureCandidateScored mcesDistToTopHit(@jakarta.annotation.Nullable Double mcesDistToTopHit) {
    
    this.mcesDistToTopHit = mcesDistToTopHit;
    return this;
  }

  /**
   * Maximum Common Edge Subgraph (MCES) distance to the top scoring hit (CSI:FingerID) in a candidate list.
   * @return mcesDistToTopHit
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_MCES_DIST_TO_TOP_HIT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Double getMcesDistToTopHit() {
    return mcesDistToTopHit;
  }


  @JsonProperty(JSON_PROPERTY_MCES_DIST_TO_TOP_HIT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setMcesDistToTopHit(@jakarta.annotation.Nullable Double mcesDistToTopHit) {
    this.mcesDistToTopHit = mcesDistToTopHit;
  }

  public StructureCandidateScored fingerprint(@jakarta.annotation.Nullable BinaryFingerprint fingerprint) {
    
    this.fingerprint = fingerprint;
    return this;
  }

  /**
   * Get fingerprint
   * @return fingerprint
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_FINGERPRINT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public BinaryFingerprint getFingerprint() {
    return fingerprint;
  }


  @JsonProperty(JSON_PROPERTY_FINGERPRINT)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFingerprint(@jakarta.annotation.Nullable BinaryFingerprint fingerprint) {
    this.fingerprint = fingerprint;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StructureCandidateScored structureCandidateScored = (StructureCandidateScored) o;
    return Objects.equals(this.inchiKey, structureCandidateScored.inchiKey) &&
        Objects.equals(this.smiles, structureCandidateScored.smiles) &&
        Objects.equals(this.structureName, structureCandidateScored.structureName) &&
        Objects.equals(this.structureSvg, structureCandidateScored.structureSvg) &&
        Objects.equals(this.dbLinks, structureCandidateScored.dbLinks) &&
        Objects.equals(this.spectralLibraryMatches, structureCandidateScored.spectralLibraryMatches) &&
        Objects.equals(this.xlogP, structureCandidateScored.xlogP) &&
        Objects.equals(this.rank, structureCandidateScored.rank) &&
        Objects.equals(this.csiScore, structureCandidateScored.csiScore) &&
        Objects.equals(this.tanimotoSimilarity, structureCandidateScored.tanimotoSimilarity) &&
        Objects.equals(this.mcesDistToTopHit, structureCandidateScored.mcesDistToTopHit) &&
        Objects.equals(this.fingerprint, structureCandidateScored.fingerprint);
  }

  @Override
  public int hashCode() {
    return Objects.hash(inchiKey, smiles, structureName, structureSvg, dbLinks, spectralLibraryMatches, xlogP, rank, csiScore, tanimotoSimilarity, mcesDistToTopHit, fingerprint);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StructureCandidateScored {\n");
    sb.append("    inchiKey: ").append(toIndentedString(inchiKey)).append("\n");
    sb.append("    smiles: ").append(toIndentedString(smiles)).append("\n");
    sb.append("    structureName: ").append(toIndentedString(structureName)).append("\n");
    sb.append("    structureSvg: ").append(toIndentedString(structureSvg)).append("\n");
    sb.append("    dbLinks: ").append(toIndentedString(dbLinks)).append("\n");
    sb.append("    spectralLibraryMatches: ").append(toIndentedString(spectralLibraryMatches)).append("\n");
    sb.append("    xlogP: ").append(toIndentedString(xlogP)).append("\n");
    sb.append("    rank: ").append(toIndentedString(rank)).append("\n");
    sb.append("    csiScore: ").append(toIndentedString(csiScore)).append("\n");
    sb.append("    tanimotoSimilarity: ").append(toIndentedString(tanimotoSimilarity)).append("\n");
    sb.append("    mcesDistToTopHit: ").append(toIndentedString(mcesDistToTopHit)).append("\n");
    sb.append("    fingerprint: ").append(toIndentedString(fingerprint)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

